#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<stdbool.h>
bool isPalindrome(int x) {
    if (x < 0)
    {
        return false;
    }
    int tmp = x;
    int arr[12];
    int n = 0;
    long sum = 0;
    while (tmp)
    {
        arr[n++] = tmp % 10;
        tmp /= 10;
    }
    for (int i = 0; i < n; i++)
    {
        sum = sum * 10 + arr[i];
    }
    if (sum == x)
    {
        return true;
    }
    return false;
}

bool isPalindrome(int x) {
    if (x < 0)
    {
        return false;
    }
    if (x % 10 == 0 && x != 0)
    {
        return false;
    }

    int reverseNumber = 0;
    while (x > reverseNumber)
    {
        reverseNumber = reverseNumber * 10 + x % 10;
        x /= 10;
    }

    return reverseNumber == x || reverseNumber / 10 == x;
}


char* longestCommonPrefix(char** strs, int strsSize) {
    if (strsSize == 0)
    {
        return "";
    }
    for (int i = 0; i < strlen(*strs); i++)
    {
        for (int j = 1; j < strsSize; j++)
        {
            if (strs[0][i] != strs[j][i])
            {
                strs[0][i] = '\0';
                break;
            }
        }
    }
    return strs[0];
}